package com.yc.bean;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;
import java.sql.Timestamp;

@Data
public class Account {
	@NotNull(message = "账号不能为空")
	private Integer accountid;
	@Min(value = 1, message = "金额不能小于1")
	@Max(value = 20000, message = "金额不能大于2万")
	@NotNull(message = "金额不能为空")
	private Double balance;

	@NotEmpty
	@NotNull
	@Length(min = 4, max = 20)
	private String name;
	@NotEmpty
	@NotNull
	@Length(min = 6, max = 16)
	private String pwd;
	@NotNull
	private Timestamp regtime;
	@Email
	@NotEmpty
	@NotNull
	private String email;

}
